home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / vbpong1a / ballfrm.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-08-07  |  1.0 KB  |  32 lines

  1. VERSION 5.00
  2. Begin VB.Form ballfrm 
  3.    BackColor       =   &H0000FFFF&
  4.    BorderStyle     =   0  'None
  5.    Caption         =   "Form1"
  6.    ClientHeight    =   135
  7.    ClientLeft      =   0
  8.    ClientTop       =   0
  9.    ClientWidth     =   135
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   9
  12.    ScaleMode       =   3  'Pixel
  13.    ScaleWidth      =   9
  14.    ShowInTaskbar   =   0   'False
  15.    StartUpPosition =   3  'Windows Default
  16. Attribute VB_Name = "ballfrm"
  17. Attribute VB_GlobalNameSpace = False
  18. Attribute VB_Creatable = False
  19. Attribute VB_PredeclaredId = True
  20. Attribute VB_Exposed = False
  21. Dim rgn As Long
  22. Private Sub Form_Load()
  23.     SetWindowPos Me.hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE
  24.     rgn = CreateRoundRectRgn(0, 0, Me.ScaleWidth, Me.ScaleHeight, Me.ScaleWidth, Me.ScaleHeight)
  25.     SetWindowRgn Me.hWnd, rgn, True
  26.     Randomize
  27.     Me.BackColor = RGB(Int(Rnd * 255), (Rnd * 255), Int(Rnd * 255))
  28. End Sub
  29. Private Sub Form_Unload(Cancel As Integer)
  30.     DeleteObject rgn
  31. End Sub
  32.